﻿using IOCPExampleProtocol;
using PNet;
using System;
using System.Collections.Generic;
using System.Text;

namespace IOCPClientExample
{
    public class ClientToken : IOCPToken<NetMsg>
    {
        protected override void Connected()
        {
            IOCPTool.Log("Client Connect...");
        }

        protected override void OnDisconnected()
        {
            IOCPTool.ColorLog(IOCPTool.LogColor.Yellow, "Client Disconnected...");
        }

        protected override void OnReceiveMsg(NetMsg msg)
        {
            IOCPTool.Log("Receive Msg:" + msg.Msg);
        }
    }
}
